<template>
  <div id="index">
    <!--导航栏-->
    <main-nav></main-nav>
    <router-view></router-view>
    <audio class="bottom_player" controls :src="url">
      您的浏览器不支持audio元素
    </audio>
  </div>
</template>

<script>
import MainNav from '@/components/Menubar/MainNavBar'
export default {
  data: function () {
    return {
      url: ''
    }
  },
  name: 'Index',
  mounted: function () {
    this.url = this.$store.state.url;
    console.log('输出：', this.url);
  },
  components: {
    MainNav
  }
}
</script>

<style>
.bottom_player {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
}
</style>